import request from '@/utils/request'

// 分页查询实体集合
export function queryForList(entity) {
  return request({
    url: '/system/entity/queryForList',
    contentType: 'application/json;charset=utf-8',
    method: 'post',
    dataType: 'json',
    data: entity,
    headers: {
      'urlType':'admin'
    }
  })
}

// 新增实体
export function createOrUpdate(entity) {
  return request({
    url: '/system/entity/createOrUpdate',
    contentType: 'application/json;charset=utf-8',
    method: 'post',
    dataType: 'json',
    data: entity,
    headers: {
      'urlType':'admin'
    }
  })
}

// 删除实体
export function deleteData(dataId) {
  return request({
    url: '/system/entity/delete/' + dataId,
    method: 'post',
    dataType: 'json',
    headers: {
      'urlType':'admin'
    }
  })
}


// 删除实体
export function getById(dataId) {
  return request({
    url: '/system/entity/getById/' + dataId,
    method: 'get',
    dataType: 'json',
    headers: {
      'urlType':'admin'
    }
  })
}